public class Main {
    public static void main(String[] args) {

        new SmallHusky().eat();

    }
}

sealed class Animal permits Cat, Dog {

    public void eat() {
        System.out.println("animal eat.");
    }

}

final class Cat extends Animal {
    public void eat() {
        System.out.println("cat eat.");
    }
}

sealed class Dog extends Animal permits Husky {
}

non-sealed class Husky extends Dog {
}

class SmallHusky extends Husky {
}
